home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / Implementation / Storage / TransDlg.r < prev    next >
Encoding:
Text File  |  1997-02-13  |  7.9 KB  |  400 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        TransDlg.r
  3.  
  4.     Contains:    resources for Translation dialog
  5.  
  6.     Owned by:    Craig Carper
  7.  
  8.     Copyright:    © 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <6>     9/18/96    TJ        1384389 Remove RSRC names in Non-Debug
  13.                                     Builds.
  14.          <5>     9/13/96    EL        1306385: OpenDoc should use default item
  15.                                     rather than user item.
  16.          <4>     9/10/96    eeh        1384356: no glitches this time
  17.          <3>     9/10/96    eeh        1384356: make resources purgeable
  18.          <9>    10/16/95    CC        GM 1292157: Changed text in Translate to
  19.                                     dialog.
  20.          <8>     9/11/95    CG        #1229981 FB2: Changed to smart quotes in
  21.                                     DITLs.
  22.          <7>      9/7/95    CG        #1229981 FB2:NoPart Alert when no
  23.                                     translators are installed.
  24.          <6>     8/24/95    CC        1279966,1279963: Separate resources for
  25.                                     Part translation dialog.
  26.          <5>     3/28/95    CC        1229640: Added alternate title for
  27.                                     translate dialog.
  28.          <4>     3/27/95    CC        1229640: Added 'finf' resource, changed
  29.                                     dialog text.
  30.          <3>     1/10/95    CG        #1207407: "OK" button is initially in
  31.                                     active.
  32.          <2>    12/13/94    CG        #1187128: Dialog clean up.
  33.          <1>    11/17/94    CG        first checked in
  34.     To Do:
  35. */
  36.  
  37. #define SystemSevenOrBetter 1            // we want the extended types
  38. #define    SystemSevenOrLater    1            // Types.r uses this variable
  39.  
  40. #include "Types.r"
  41. #include "SysTypes.r"
  42.  
  43. #include "TrnDlgDf.h"
  44.  
  45. #define kODTransDataItemRight    316
  46.  
  47. /* Translation Dialog */
  48. resource 'DLOG' (kODTransDlgID,
  49. #if ODDebug
  50. "Translate",
  51. #endif
  52. purgeable /*<eeh> added for 1384356*/) {
  53.     {kODTransDialogTop, kODTransDialogLeft, 
  54.         kODTransDialogBottom, kODTransDialogRight},
  55.     dBoxProc,
  56.     invisible,
  57.     noGoAway,
  58.     0x0,
  59.     kODTransDlgID,
  60.     "Part Translation",
  61.     alertPositionParentWindow
  62. };
  63.  
  64. /* Color table for Translation Dialog */
  65. resource 'dctb' (kODTransDlgID,
  66. #if ODDebug
  67. "Translate",
  68. #endif
  69. purgeable /*<eeh> added for 1384356*/) {
  70.     0,
  71.     0,
  72.     {
  73.         wContentColor,0xFFFF,0xFFFF,0xFFFF
  74.     }
  75. };
  76.  
  77. /* Item list for Translation dialog */
  78. resource 'DITL' (kODTransDlgID,
  79. #if ODDebug
  80. "Translate",
  81. #endif
  82. purgeable /*<eeh> added for 1384356*/) {
  83.     {    /* array DITLarray: 9 elements */
  84.         /* [1] kODTransOKBtn */
  85.         {91, 177, 91+20, 177+59},
  86.         Button {
  87.             enabled,
  88.             "OK"
  89.         },
  90.         /* [2] kODTransCancelBtn */
  91.         {91, 105, 91+20, 105+59},
  92.         Button {
  93.             enabled,
  94.             "Cancel"
  95.         },
  96.         /* [3] kODTransTitle */
  97.         {kItemOnEdgeWhtSp, kItemOnEdgeWhtSp,
  98.             kItemOnEdgeWhtSp+kODTransStaticTxtHeight, 
  99.             kItemOnEdgeWhtSp+200},
  100.         StaticText {
  101.             disabled,
  102.             "Translate to:"
  103.         },
  104.         /* [4] kODTransKindPopup */
  105.         {34, 20, 34+16, 20+200},
  106.         Control {
  107.             enabled,
  108.             kODTransKindCntl
  109.         },
  110.         /* [5] kODTransEditorPopup */
  111.         {55, 20, 55+16, 20+200},
  112.         Control {
  113.             enabled,
  114.             kODTransEditorCntl
  115.         },
  116.         /* [6] kODTransEditorLabel */
  117.         {55, 30, 55+16, 75},
  118.         StaticText {
  119.             disabled,
  120.             "Editor:"
  121.         },
  122.         /* [7] kODTransEditorText */
  123.         {55, 80, 55+16, 20+200},
  124.         StaticText {
  125.             disabled,
  126.             "Unknown"
  127.         },
  128.         /* [8] kODTransNoEditorText */
  129.         {55, 80, 55+16, 20+200},
  130.         StaticText {
  131.             disabled,
  132.             "None for this Kind"
  133.         }
  134.     }
  135. };
  136.  
  137. /* Color table for Translation Dialog items */
  138. data 'ictb' (kODTransDlgID,
  139. #if ODDebug
  140. "Translate",
  141. #endif
  142. purgeable /*<eeh> added for 1384356*/) {
  143.     $"0000 0000" /* [1]  */
  144.     $"0000 0000" /* [2]  */
  145.     $"0002 0020" /* [3]  Bold this item */
  146.     $"0000 0000" /* [4]  */
  147.     $"0000 0000" /* [5]  */
  148.     $"0000 0000" /* [6]  */
  149.     $"0000 0000" /* [7]  */
  150.     $"0000 0000" /* [8]  */
  151.     /* Text style record */
  152.     $"0000 0100 0000"      /* Bold              */
  153.     $"0000 0000 0000"      /* fore color        */
  154.     $"0000 0000 0000 0000" /* back color + mode */
  155. };
  156.  
  157. /* Window font for Translation dialog */
  158. resource 'finf' (kODTransDlgID, "", purgeable) {
  159.     {
  160.         3,            /* Font Number, 3 = Geneva    */
  161.         plain,        /*         Font Style        */
  162.         10            /*         Font Size        */
  163.     }
  164. };
  165.  
  166. /* Part Translation Dialog */
  167. resource 'DLOG' (kODPartTransDlgID,
  168. #if ODDebug
  169. "Translate",
  170. #endif
  171. purgeable /*<eeh> added for 1384356*/) {
  172.     {kODTransDialogTop, kODTransDialogLeft, 
  173.         kODTransDialogBottom, kODTransDialogRight},
  174.     dBoxProc,
  175.     invisible,
  176.     noGoAway,
  177.     0x0,
  178.     kODPartTransDlgID,
  179.     "Part Translation",
  180.     alertPositionParentWindow
  181. };
  182.  
  183. /* Color table for Part Translation Dialog */
  184. resource 'dctb' (kODPartTransDlgID,
  185. #if ODDebug
  186. "Translate",
  187. #endif
  188. purgeable /*<eeh> added for 1384356*/) {
  189.     0,
  190.     0,
  191.     {
  192.         wContentColor,0xFFFF,0xFFFF,0xFFFF
  193.     }
  194. };
  195.  
  196. /* Item list for Part Translation dialog */
  197. resource 'DITL' (kODPartTransDlgID,
  198. #if ODDebug
  199. "Translate",
  200. #endif
  201. purgeable /*<eeh> added for 1384356*/) {
  202.     {    /* array DITLarray: 9 elements */
  203.         /* [1] kODTransOKBtn */
  204.         {91, 157, 91+20, 157+79},
  205.         Button {
  206.             enabled,
  207.             "Translate"
  208.         },
  209.         /* [2] kODTransCancelBtn */
  210.         {91, 85, 91+20, 85+59},
  211.         Button {
  212.             enabled,
  213.             "Cancel"
  214.         },
  215.         /* [3] kODTransTitle */
  216.         {kItemOnEdgeWhtSp, kItemOnEdgeWhtSp,
  217.             kItemOnEdgeWhtSp+kODTransStaticTxtHeight, 
  218.             kItemOnEdgeWhtSp+200},
  219.         StaticText {
  220.             disabled,
  221.             "Translate this part to:"
  222.         },
  223.         /* [4] kODTransKindPopup */
  224.         {34, 20, 34+16, 20+200},
  225.         Control {
  226.             enabled,
  227.             kODTransKindCntl
  228.         },
  229.         /* [5] kODTransEditorPopup */
  230.         {55, 20, 55+16, 20+200},
  231.         Control {
  232.             enabled,
  233.             kODTransEditorCntl
  234.         },
  235.         /* [6] kODTransEditorLabel */
  236.         {55, 30, 55+16, 75},
  237.         StaticText {
  238.             disabled,
  239.             "Editor:"
  240.         },
  241.         /* [7] kODTransEditorText */
  242.         {55, 80, 55+16, 20+200},
  243.         StaticText {
  244.             disabled,
  245.             "Unknown"
  246.         },
  247.         /* [8] kODTransNoEditorText */
  248.         {55, 80, 55+16, 20+200},
  249.         StaticText {
  250.             disabled,
  251.             "None for this Kind"
  252.         }
  253.     }
  254. };
  255.  
  256. /* Color table for Part Translation Dialog items */
  257. data 'ictb' (kODPartTransDlgID,
  258. #if ODDebug
  259. "Translate",
  260. #endif
  261. purgeable /*<eeh> added for 1384356*/) {
  262.     $"0000 0000" /* [1]  */
  263.     $"0000 0000" /* [2]  */
  264.     $"0002 0020" /* [3]  Bold this item */
  265.     $"0000 0000" /* [4]  */
  266.     $"0000 0000" /* [5]  */
  267.     $"0000 0000" /* [6]  */
  268.     $"0000 0000" /* [7]  */
  269.     $"0000 0000" /* [8]  */
  270.     /* Text style record */
  271.     $"0000 0100 0000"      /* Bold              */
  272.     $"0000 0000 0000"      /* fore color        */
  273.     $"0000 0000 0000 0000" /* back color + mode */
  274. };
  275.  
  276. /* Window font for Part Translation dialog */
  277. resource 'finf' (kODPartTransDlgID, "", purgeable) {
  278.     {
  279.         3,            /* Font Number, 3 = Geneva    */
  280.         plain,        /*         Font Style        */
  281.         10            /*         Font Size        */
  282.     }
  283. };
  284.  
  285. resource 'CNTL' (kODTransKindCntl
  286. #If ODDebug
  287. ,"Kind"
  288. #endif
  289. ) {
  290.         {34, 20, 34+16, 20+200},
  291.         popupTitleBold+popupTitleRightJust,
  292.         visible,
  293.         47,                    /* width of title in pixels     */
  294.         kODTransKindMenu,    /* resource id of MENU resource */
  295.         popupMenuCDEFproc+popupUseWFont+popupFixedWidth,
  296.         0,                    /* Refcon */
  297.         "Kind:"
  298. };
  299.  
  300. resource 'CNTL' (kODTransEditorCntl
  301. #If ODDebug
  302. , "Editor"
  303. #endif
  304. ) {
  305.         {55, 20, 55+16, 20+200},
  306.         popupTitleBold+popupTitleRightJust,
  307.         visible,
  308.         47,                    /* width of title in pixels     */
  309.         kODTransEditorMenu,    /* resource id of MENU resource */
  310.         popupMenuCDEFproc+popupUseWFont+popupFixedWidth,
  311.         0,                    /* Refcon */
  312.         "Editor:"
  313. };
  314.  
  315. resource 'MENU' (kODTransKindMenu
  316. #If ODDebug
  317. , "Kind"
  318. #endif
  319. ) {
  320.     kODTransKindMenu,
  321.     textMenuProc,
  322.     allEnabled,
  323.     enabled,
  324.     "Kind",
  325.     {    /* array: 0 elements */
  326.     }
  327. };
  328.  
  329. resource 'MENU' (kODTransEditorMenu
  330. #If ODDebug
  331. , "Editor"
  332. #endif
  333. ) {
  334.     kODTransEditorMenu,
  335.     textMenuProc,
  336.     allEnabled,
  337.     enabled,
  338.     "Editor",
  339.     {    /* array: 0 elements */
  340.     }
  341. };
  342.  
  343.  
  344. resource 'ALRT' (kODNoTransAlert,
  345. #if ODDebug
  346. "No editor/translator",
  347. #endif
  348. purgeable /*<eeh> added for 1384356*/) {
  349.     {40, 40, 124, 383},
  350.     kODNoTransAlert,
  351.     {    /* array: 4 elements */
  352.         /* [1] */
  353.         OK, visible, sound1,
  354.         /* [2] */
  355.         OK, visible, sound1,
  356.         /* [3] */
  357.         OK, visible, sound1,
  358.         /* [4] */
  359.         OK, visible, sound1
  360.     }
  361. #if SystemSevenOrLater
  362.     ,
  363.     centerParentWindowScreen
  364. #endif
  365. };
  366.  
  367. resource 'DITL' (kODNoTransAlert,
  368. #if ODDebug
  369. "No editor/translator",
  370. #endif
  371. purgeable /*<eeh> added for 1384356*/) {
  372.     {    /* array DITLarray: 4 elements */
  373.         /* [1] */
  374.         {53, 270, 73, 328},
  375.         Button {
  376.             enabled,
  377.             "OK"
  378.         },
  379.         /* [2] */
  380.         {10, 62, 42, 328},
  381.         StaticText {
  382.             disabled,
  383.             "No editors or translators could be found"
  384.             " to open “^0.”"
  385.         },
  386.         /* [3] */
  387.         {10, 20, 42, 52},
  388.         Icon {
  389.             disabled,
  390.             0
  391.         },
  392.         /* [4] */
  393.         {49, 266, 77, 332},
  394.         UserItem {
  395.             disabled
  396.         }
  397.     }
  398. };
  399.  
  400.